package com.geekgo.flowcontroller;

import com.geekgo.flowcontroller.annotation.DPSRate;
import com.geekgo.flowcontroller.annotation.QPSRate;
import com.geekgo.flowcontroller.annotation.RateLimit;

/**
 * @author geekgo
 * @version 2016/8/4 14:33
 */
@RateLimit
public class HelloService {

    @QPSRate(rate = 1)
    public void sayHelloPerSecond(){
        System.out.println("say one per second");

    }
    @QPSRate(rate = 0.5)
    public void sayHelloTwoSecond(){
        System.out.println("say one per second");

    }
    public void sayData(@DPSRate(rate = 1) byte[] data){
        System.out.println("say data ");
    }

}
